package com.qf.fc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表(User)表实体类
 *
 * @author makejava
 * @since 2024-09-16 22:56:00
 */
@Data  //简化类自动生成Get和Set和toString
@TableName("t_user")  //标记对应的表名
@NoArgsConstructor
public class User extends Model<User> {
    //序号，自增
    @TableId(type = IdType.AUTO)  //主键设置自增方式
    private Integer id;
    //电话
    private String phone;
    //密码，密文
    private String password;
    //状态，有效 无效
    private String status;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;

    public User(String phone, String password) {
        this.phone = phone;
        this.password = password;
        this.status = "有效";
        this.createTime = new Date();
        this.updateTime = new Date();
    }
}

